package com.tarena.spring.boot.config.condition;

import com.tarena.spring.boot.bean.Bean02;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Configuration;

@Configuration
//指定类 bean在容器中存在 则条件满足
//@ConditionalOnBean(value={Bean02.class})
@ConditionalOnMissingBean(value={Bean02.class})
public class ConditionDemo02Config {
    public ConditionDemo02Config() {
        System.out.println("条件满足,condition-demo02被容器加载");
    }
}
